package org.ala.tiktools.sharddb.tx;

/**
 * 事务环境
 *
 * @author ala
 * @date 2025-03-12 13:53
 */
public class ShardTransactionThreadLocal {

    static ThreadLocal<IShardTransaction> val = new ThreadLocal<>();

    public static void setTx(IShardTransaction tx) {val.set(tx);}
    public static IShardTransaction getTx() {return val.get();}
    public static void clear() {val.remove();}
}
